<?
	include ('user/counter_rsp.php');
	include ('user/response.php');
	$response_img_dir = "/user/images/response/";
?>
<div class="art-box art-block" style="margin-top: 12px;">
    <div class="art-box-body art-block-body">
                <div class="response-box">
                    <div class="response-header">Отзывы клиентов</div>
<?
	$resp_ids = explode(",",$resp_ids_string);
	$resp2show = array();
	$is_first = true;
	$field_kind = array('name','city','contact','text');
	foreach ($resp_ids as $resp_id) {		$resp2show[${"response_".$resp_id."_pos"}] = $resp_id;
		foreach ($field_kind as $fk) ${"response_".$resp_id."_".$fk} = htmlspecialchars_decode(${"response_".$resp_id."_".$fk});
	}
	if (!empty($resp2show)) {
		ksort($resp2show,SORT_NUMERIC);
		foreach ($resp2show as $resp_id) {			if (!$is_first) echo '<hr>'; else $is_first = false;
?>
                    <div class="response">
                    	<span class="resp-name"><br><?=${"response_".$resp_id."_name"}?></span>
                    	<? if (!empty(${"response_".$resp_id."_img"})) {?>
                    		<span class="resp-city"><br>
                    			<img src="<?=$response_img_dir.${'response_'.$resp_id.'_img'}?>" width="157px" alt="" border="0">
                    		</span>
                    	<?}?>
                    	<? if (!empty(${"response_".$resp_id."_city"})) {?>
                    		<span class="resp-city"><br><?=${"response_".$resp_id."_city"}?></span>
                    	<?}?>
                    	<? if (!empty(${"response_".$resp_id."_contact"})) {?>
                    		<span class="resp-contact"><br><?=${"response_".$resp_id."_contact"}?></span>
                    	<?}?>
                    	<br><span class="resp-text"><br><?=${"response_".$resp_id."_text"}?></span>
                    </div>
<?
		}
	}
?>
                    <br>
                    <div style="text-align: center;">
                    	<a class="get-call" id="inline_response" href="#get-response">Оставить отзыв</a>
                    </div>
                </div>
		<div class="cleared"></div>
    </div>
</div>